import http.client

#   和处理普通和请求并没有任何区别
#   建立与服务器的连接
conn = http.client.HTTPSConnection('www.oschina.net')
#   构建头部
headers = {'Accept': '*/*', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}
#   构建正文
data = 'from=&name=eiyo1314&pwd=lian040827&cpwd=lian040827&verifyCode=fdwtxx&phone=18113028757&phone_v_code=199532&gender=a.txt&agree_terms=a.txt'
#   定义url
url = '/action/user/quick_create'
#   向服务器发起POST请求
conn.request('POST', url=url, headers=headers, body=data)
#   获取响应并解码
response = conn.getresponse().read().decode()
#   打印响应
print(response)
